.TH std::enable_shared_from_this::weak_from_this 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::enable_shared_from_this::weak_from_this \- std::enable_shared_from_this::weak_from_this

.SH Synopsis
   std::weak_ptr<T> weak_from_this() noexcept;             \fB(1)\fP \fI(since C++17)\fP
   std::weak_ptr<T const> weak_from_this() const noexcept; \fB(2)\fP \fI(since C++17)\fP

   Returns a std::weak_ptr<T> that tracks ownership of *this by all existing
   std::shared_ptr that refer to *this.

.SH Return value

   std::weak_ptr<T> that shares ownership of *this with pre-existing std::shared_ptrs.

.SH Notes

   weak_from_this copies the exposition only weak_ptr member that is part of
   enable_shared_from_this.

       Feature-test macro          Value    Std                     Feature
__cpp_lib_enable_shared_from_this 201603L \fI(C++17)\fP std::enable_shared_from_this::weak_from_this

.SH Example

    This section is incomplete
    Reason: no example

.SH See also

   shared_ptr smart pointer with shared object ownership semantics
   \fI(C++11)\fP    \fI(class template)\fP

.SH Category:
     * Todo no example
